package com.bona.dao.common;

import java.util.List;

import com.github.miemiedev.mybatis.paginator.domain.PageBounds;

public interface BaseDao {
	
	public <T> T query(Object obj);
	
	public <T> Integer add(T t);
	
	public <T> Integer addBatch(List<T> list);
	
	public Integer delete(Object obj);
	
	public Integer deleteBatch(List<?> list);
	
	public Integer update(Object obj);
	
	/**
	 * 遵循默认，list、array
	 * 对象统一用model
	 * @param map
	 * @return
	 */
	public Integer queryByCount(Object model);
	
	/**
	 * 遵循默认，list、array
	 * 对象统一用model
	 * @param map
	 * @param pageBounds
	 * @return
	 */
	public <T> List<T> queryByPage(Object model, PageBounds pageBounds);
	
}
